<style type="text/css">
div.wide form .buttons { width: 100px; }
</style>

<?php
$this->breadcrumbs=array(
    'Setting Params',
);
?>

<h1>Settings</h1>

<div class="form wide">
    <?php echo CHtml::beginForm('', 'post', array('id'=>'FilterForm'));?>
        <div class="row">
            <?php echo CHtml::label('Edit settings for', 'module');?>
            <?php echo CHtml::dropDownList('SettingParam[module]', $module, $modules, array('onchange'=>"\$('#FilterForm').submit();"));?>
        </div>
    </form>
</div><!-- search-form -->

<?php
//$form = $this->beginWidget('Admin.components.ParamForm',array(
//    'params' => $params,
//    'config' => $config
//));
    if(!empty($form->elements)){
        $form->beginForm();
        echo CHtml::hiddenField('SettingParam[module]', $module);
        $group = '';
        foreach($form->elements as $name => $elm) {
            if ($group != $elm->param->setting_group) {
                $group = $elm->param->setting_group;
                echo "<div class=\"form-group-heading\">{$group}</div>";
            }
            echo $elm->render();
        }
        
        $form->endForm();
    }
//$this->endWidget();
?>